package la.iok.hzsvn.lewin.movie.model;

import java.util.Objects;

public class MovieLevelParam {
    /**
     * 名称
     */
    private String name;
    /**
     * 价格,单位分
     */
    private Integer price;
    /**
     * 开放价格。店铺开指定类型的剧本的时候，玩家需要支付的剧本费,单位:分
     */
    private Integer openPrice;
    /**
     * 是否支持返利。默认为1，表示支持。如果不支持,则在计算返利的时候,这种类型的剧本开本次数不计算在内,也不计算对应的费用
     */
    private Integer returnMoneySupport;
    /**
     * 是否启用假期价格。如果启用假期价格则在开放价格的基础上增加20元，同时需要开放价格大于0（等于0即使启用假期价格也无效果）。1:启用，0：不启用。默认为1
     */
    private Integer enableHolidayPrice;
    /**
     * 数据版本,修改的时候需要。添加的时候不需要
     */
    private Long version;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getOpenPrice() {
        return openPrice;
    }

    public void setOpenPrice(Integer openPrice) {
        this.openPrice = openPrice;
    }

    public Integer getReturnMoneySupport() {
        return returnMoneySupport;
    }

    public void setReturnMoneySupport(Integer returnMoneySupport) {
        this.returnMoneySupport = returnMoneySupport;
    }

    public Integer getEnableHolidayPrice() {
        return enableHolidayPrice;
    }

    public void setEnableHolidayPrice(Integer enableHolidayPrice) {
        this.enableHolidayPrice = enableHolidayPrice;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MovieLevelParam)) return false;
        MovieLevelParam param = (MovieLevelParam) o;
        return Objects.equals(name, param.name) && Objects.equals(price, param.price)
                && Objects.equals(openPrice, param.openPrice) && Objects.equals(returnMoneySupport, param.returnMoneySupport)
                && Objects.equals(version, param.version) && Objects.equals(enableHolidayPrice, param.enableHolidayPrice);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, price, openPrice, returnMoneySupport, enableHolidayPrice, version);
    }
}
